﻿<%@ Control Language="VB" AutoEventWireup="false" CodeFile="List.ascx.vb" Inherits="Control_VBPQ_List" %>
<%@ Import Namespace="Cls_common" %>
<script type='text/javascript'>
    function ajaxJquery() {
        $(function () {
            $(".ui-tabViewNav li").click(function () {
                //hide tab
                $(".ui-tabViewNav li").each(function () { $(this).removeClass("selected"); });
                //show click
                $(this).addClass("selected");
                var divShow = $(this).find("a").attr("href");
                //hide detail
                $(".detailTab").each(function () { $(this).attr("style", "display:none"); });
                //show detail click
                $("#" + divShow).attr("style", "display:inline");
                return false;
            });

            //show hidden box search

            $(".Date").datepicker({ dateFormat: 'dd/mm/yy' });
            // ChangeShow();            
            //check cookie to show or hide search pannel
            if ($.cookie('CookieSSMSearch') == 1) {
                $('#pnlSearch').show();
            }
            else {
                $('#pnlSearch').hide();
            }

            $("#<%=btnClear.ClientID %>").click(function () {
                $("#divExpert").css("display", "none");
                return true;
            });

            $('#B1').click(function (event) {
                //set cookie
                if ($.cookie('CookieSSMSearch') == 1) {
                    $.cookie('CookieSSMSearch', 0)
                }
                else {
                    $.cookie('CookieSSMSearch', 1)
                }
                $('#pnlSearch').slideToggle(500);

                if ($('#imgShowHide').attr("src") == "images/arrow_popup.gif") {

                    $('#imgShowHide').attr("src", "images/arrow_showless.gif");
                }
                else {
                    $('#imgShowHide').attr("src", "images/arrow_popup.gif");
                }
            });

        });
    }


    function ResetSearch() {
        $('#pnlSearch [type=text]').each(function (e) {
            $(this).val("");
        });
        $('#pnlSearch select').each(function (e) {
            $(this).attr('selectedIndex', 0);
        });

        return false;
    }
    
</script>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <div class="padding-fix panel-corner">
            <div class="mainDiv_center">
                <div class="div_title_green row_subtitle">
                    <span class="label_title_green">
                        <img src='<%=Maindomain + "images/icon-bai-dang.png" %>' border="0" align="absmiddle">
                        <asp:HyperLink ID="hplTitle" runat="server">VĂN BẢN PHÁP LUẬT</asp:HyperLink>
                    </span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
                <div class="boxCenter">
                    <div style="clear: both; height: 10px;">
                    </div>
                    <img alt="" src='<%=Maindomain + "images/arrow_showless.gif" %>' id="imgShowHide"
                        style="display: none;" />
                    <a id="B1" style="display: none;" href="#">Tìm kiếm </a>
                    <div id="pnlSearch" style="display: none;">
                        <div class="DivRow" style="padding-bottom: 28px">
                            <div class="DivLabel" style="width: 25%; text-align: right; float: left">
                                Trích yếu:</div>
                            <div class=" DivTextBox" style="width: 70%; float: left">
                                <asp:TextBox ID="txtTitleFilter" runat="server" CssClass='TextBox'></asp:TextBox></div>
                        </div>
                        <div class="DivRow">
                            <div style="width: 25%; text-align: right; float: left" class="DivLabel">
                                Số ký hiệu:</div>
                            <div class="DivTextBox" style="width: 70%; float: left">
                                <asp:TextBox ID="txtCodeFilter" runat="server" CssClass='TextBox'></asp:TextBox>
                            </div>
                        </div>
                        <div id="divExpert" style="display: none" class="DivRow">
                            <div style="width: 25%; text-align: right; float: left" class="DivLabel">
                                Chuyên gia:</div>
                            <div class="DivTextBox" style="width: 70%; float: left">
                                <asp:DropDownList ID="ddlExpert" runat="server" CssClass="DropDownList">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="DivRow">
                            <div style="width: 25%; text-align: right; float: left" class="DivLabel">
                                Loại văn bản:</div>
                            <div class="DivTextBox" style="width: 70%; float: left">
                                <asp:DropDownList ID="drpType" runat="server" CssClass="DropDownList">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="DivRow">
                            <div style="width: 25%; text-align: right; float: left" class="DivLabel">
                                Cơ quan ban hành:</div>
                            <div class="DivTextBox" style="width: 70%; float: left">
                                <asp:DropDownList ID="drpPromulgator" runat="server" CssClass="DropDownList">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="DivRow">
                            <div style="width: 25%; text-align: right; float: left" class="DivLabel">
                                Người ký:</div>
                            <div class="DivTextBox" style="width: 70%; float: left">
                                <asp:DropDownList ID="drpSigner" runat="server" CssClass="DropDownList">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="DivRow">
                            <div style="width: 25%; text-align: right; float: left" class="DivLabel">
                                Ngày ban hành:</div>
                            <div class="DivTextBox" style="width: 500px; height: 20px; float: left">
                                <asp:TextBox ID="txtStartPublish" runat="server" Width="108px" CssClass="TextBox Date"></asp:TextBox>
                                tới:
                                <asp:TextBox ID="txtEndPublish" runat="server" Width="108px" CssClass="TextBox Date"></asp:TextBox>
                            </div>
                        </div>
                        <div style="clear: both; height: 5px;">
                        </div>
                        <div class="DivRow">
                            <div style="width: 25%; text-align: right; float: left" class="DivLabel">
                                Sắp xếp:</div>
                            <div class="DivTextBox" style="width: 70%; float: left">
                                <asp:DropDownList ID="drpSort" runat="server" CssClass="DropDownList">
                                    <asp:ListItem Value="1" Selected="True">Ngày ban hành</asp:ListItem>
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div style="clear: both; height: 10px;">
                        </div>
                        <div class="DivRow">
                            <div style="float: left; width: 240px; height: 20px; text-align: right;" class="DivLabel">
                            </div>
                            <div class="DivTextBox">
                                <div class="btnOrange_large">
                                    <asp:Button ID="btnFilter" runat="server" Text='Tìm kiếm' CssClass="btn btn-sm btn-info" />
                                </div>
                                <div class="btnOrange_large">
                                    <asp:Button ID="btnClear" runat="server" CausesValidation="false" Text="Hủy" CssClass="btn btn-sm btn-info" />
                                </div>
                            </div>
                        </div>
                    </div>
                    <div style="clear: both; height: 10px;">
                    </div>
                    <%--<table class="tbl_vbpq" cellspacing="0" cellpadding="0" bordercolor="#dbdbdb" border="1">--%>
                    <div>
                        <ul class="ui-tabViewNav">
                            <li class="selected"><a href="Luat">Luật</a></li>
                            <li><a href="NghiDinh">Nghị định</a></li>
                            <li><a href="ThongTu">Thông tư</a></li>
                            <li><a href="QuyetDinh">Quyết định</a></li>
                            <li><a href="VanBanLienQuan">Văn bản liên quan</a></li>
                        </ul>
                        <div class="ui-tabViewContent">
                            <div id="Luat" class="detailTab pbl">
                                <asp:GridView ID="grdShowLuat" runat="server" AutoGenerateColumns="False" EmptyDataText="{Không có dữ liệu}"
                                    Width='100%' BorderWidth="1px" CssClass="GridBorder">
                                    <Columns>
                                        <asp:TemplateField HeaderText="STT">
                                            <ItemTemplate>
                                                <asp:Label runat="server" ID="lblSTT" Text=''></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle Width="5%" HorizontalAlign="Left" />
                                        </asp:TemplateField>
                                        <asp:BoundField HeaderText='Số hiệu văn bản' DataField='SoKyHieu'>
                                            <ItemStyle Width='22%' />
                                        </asp:BoundField>
                                        <asp:BoundField HeaderText='Ngày ban hành' DataField='NgayBanHanh' DataFormatString="{0:dd/MM/yyyy}">
                                            <ItemStyle Width='20%' />
                                        </asp:BoundField>
                                        <asp:TemplateField HeaderText='Tên văn bản'>
                                            <ItemTemplate>
                                                <asp:HyperLink ID="hplTitle" runat="server"></asp:HyperLink>
                                            </ItemTemplate>
                                            <ItemStyle Width='58%' CssClass='text_list_links' HorizontalAlign='Left' />
                                        </asp:TemplateField>
                                    </Columns>
                                    <HeaderStyle Height="26px" HorizontalAlign="Left" CssClass="GridHeader" />
                                    <RowStyle CssClass="GridRow" Height="23px" />
                                    <AlternatingRowStyle CssClass="GridAlterRow" />
                                    <PagerStyle CssClass="GridPaged" HorizontalAlign="Right" Height="23px" />
                                    <PagerSettings Mode="Numeric" PageButtonCount="2" />
                                    <EmptyDataRowStyle CssClass="GridTextEmpty" HorizontalAlign="Center" />
                                </asp:GridView>
                            </div>
                            <div id="NghiDinh" class="detailTab pbl" style="display: none;">
                                <asp:GridView ID="grdShowNghiDinh" runat="server" AutoGenerateColumns="False" EmptyDataText="{Không có dữ liệu}"
                                    Width='100%' BorderWidth="1px" CssClass="GridBorder">
                                    <Columns>
                                        <asp:TemplateField HeaderText="STT">
                                            <ItemTemplate>
                                                <asp:Label runat="server" ID="lblSTT" Text=''></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle Width="5%" HorizontalAlign="Left" />
                                        </asp:TemplateField>
                                        <asp:BoundField HeaderText='Số hiệu văn bản' DataField='SoKyHieu'>
                                            <ItemStyle Width='22%' />
                                        </asp:BoundField>
                                        <asp:BoundField HeaderText='Ngày ban hành' DataField='NgayBanHanh' DataFormatString="{0:dd/MM/yyyy}">
                                            <ItemStyle Width='20%' />
                                        </asp:BoundField>
                                        <asp:TemplateField HeaderText='Tên văn bản'>
                                            <ItemTemplate>
                                                <asp:HyperLink ID="hplTitle" runat="server"></asp:HyperLink>
                                            </ItemTemplate>
                                            <ItemStyle Width='58%' CssClass='text_list_links' HorizontalAlign='Left' />
                                        </asp:TemplateField>
                                    </Columns>
                                    <HeaderStyle Height="26px" HorizontalAlign="Left" CssClass="GridHeader" />
                                    <RowStyle CssClass="GridRow" Height="23px" />
                                    <AlternatingRowStyle CssClass="GridAlterRow" />
                                    <PagerStyle CssClass="GridPaged" HorizontalAlign="Right" Height="23px" />
                                    <PagerSettings Mode="Numeric" PageButtonCount="2" />
                                    <EmptyDataRowStyle CssClass="GridTextEmpty" HorizontalAlign="Center" />
                                </asp:GridView>
                            </div>
                            <div id="ThongTu" class="detailTab pbl" style="display: none;">
                                <asp:GridView ID="grdShowThongTu" runat="server" AutoGenerateColumns="False" EmptyDataText="{Không có dữ liệu}"
                                    Width='100%' BorderWidth="1px" CssClass="GridBorder">
                                    <Columns>
                                        <asp:TemplateField HeaderText="STT">
                                            <ItemTemplate>
                                                <asp:Label runat="server" ID="lblSTT" Text=''></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle Width="5%" HorizontalAlign="Left" />
                                        </asp:TemplateField>
                                        <asp:BoundField HeaderText='Số hiệu văn bản' DataField='SoKyHieu'>
                                            <ItemStyle Width='22%' />
                                        </asp:BoundField>
                                        <asp:BoundField HeaderText='Ngày ban hành' DataField='NgayBanHanh' DataFormatString="{0:dd/MM/yyyy}">
                                            <ItemStyle Width='20%' />
                                        </asp:BoundField>
                                        <asp:TemplateField HeaderText='Tên văn bản'>
                                            <ItemTemplate>
                                                <asp:HyperLink ID="hplTitle" runat="server"></asp:HyperLink>
                                            </ItemTemplate>
                                            <ItemStyle Width='58%' CssClass='text_list_links' HorizontalAlign='Left' />
                                        </asp:TemplateField>
                                    </Columns>
                                    <HeaderStyle Height="26px" HorizontalAlign="Left" CssClass="GridHeader" />
                                    <RowStyle CssClass="GridRow" Height="23px" />
                                    <AlternatingRowStyle CssClass="GridAlterRow" />
                                    <PagerStyle CssClass="GridPaged" HorizontalAlign="Right" Height="23px" />
                                    <PagerSettings Mode="Numeric" PageButtonCount="2" />
                                    <EmptyDataRowStyle CssClass="GridTextEmpty" HorizontalAlign="Center" />
                                </asp:GridView>
                            </div>
                            <div id="QuyetDinh" class="detailTab pbl" style="display: none;">
                                <asp:GridView ID="grdShowQuyetDinh" runat="server" AutoGenerateColumns="False" EmptyDataText="{Không có dữ liệu}"
                                    Width='100%' BorderWidth="1px" CssClass="GridBorder">
                                    <Columns>
                                        <asp:TemplateField HeaderText="STT">
                                            <ItemTemplate>
                                                <asp:Label runat="server" ID="lblSTT" Text=''></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle Width="5%" HorizontalAlign="Left" />
                                        </asp:TemplateField>
                                        <asp:BoundField HeaderText='Số hiệu văn bản' DataField='SoKyHieu'>
                                            <ItemStyle Width='22%' />
                                        </asp:BoundField>
                                        <asp:BoundField HeaderText='Ngày ban hành' DataField='NgayBanHanh' DataFormatString="{0:dd/MM/yyyy}">
                                            <ItemStyle Width='20%' />
                                        </asp:BoundField>
                                        <asp:TemplateField HeaderText='Tên văn bản'>
                                            <ItemTemplate>
                                                <asp:HyperLink ID="hplTitle" runat="server"></asp:HyperLink>
                                            </ItemTemplate>
                                            <ItemStyle Width='58%' CssClass='text_list_links' HorizontalAlign='Left' />
                                        </asp:TemplateField>
                                    </Columns>
                                    <HeaderStyle Height="26px" HorizontalAlign="Left" CssClass="GridHeader" />
                                    <RowStyle CssClass="GridRow" Height="23px" />
                                    <AlternatingRowStyle CssClass="GridAlterRow" />
                                    <PagerStyle CssClass="GridPaged" HorizontalAlign="Right" Height="23px" />
                                    <PagerSettings Mode="Numeric" PageButtonCount="2" />
                                    <EmptyDataRowStyle CssClass="GridTextEmpty" HorizontalAlign="Center" />
                                </asp:GridView>
                            </div>
                            <div id="VanBanLienQuan" class="detailTab pbl">
                                <asp:GridView ID="grdShowVanBanLienQuan" runat="server" AutoGenerateColumns="False"
                                    EmptyDataText="{Không có dữ liệu}" Width='100%' BorderWidth="1px" CssClass="GridBorder">
                                    <Columns>
                                        <asp:TemplateField HeaderText="STT">
                                            <ItemTemplate>
                                                <asp:Label runat="server" ID="lblSTT" Text=''></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle Width="5%" HorizontalAlign="Left" />
                                        </asp:TemplateField>
                                        <asp:BoundField HeaderText='Số hiệu văn bản' DataField='SoKyHieu'>
                                            <ItemStyle Width='22%' />
                                        </asp:BoundField>
                                        <asp:BoundField HeaderText='Ngày ban hành' DataField='NgayBanHanh' DataFormatString="{0:dd/MM/yyyy}">
                                            <ItemStyle Width='20%' />
                                        </asp:BoundField>
                                        <asp:TemplateField HeaderText='Tên văn bản'>
                                            <ItemTemplate>
                                                <asp:HyperLink ID="hplTitle" runat="server"></asp:HyperLink>
                                            </ItemTemplate>
                                            <ItemStyle Width='58%' CssClass='text_list_links' HorizontalAlign='Left' />
                                        </asp:TemplateField>
                                    </Columns>
                                    <HeaderStyle Height="26px" HorizontalAlign="Left" CssClass="GridHeader" />
                                    <RowStyle CssClass="GridRow" Height="23px" />
                                    <AlternatingRowStyle CssClass="GridAlterRow" />
                                    <PagerStyle CssClass="GridPaged" HorizontalAlign="Right" Height="23px" />
                                    <PagerSettings Mode="Numeric" PageButtonCount="2" />
                                    <EmptyDataRowStyle CssClass="GridTextEmpty" HorizontalAlign="Center" />
                                </asp:GridView>
                            </div>
                        </div>
                    </div>
                    <div style="clear: both; height: 10px;">
                    </div>
                <%--</table>--%>
                <div align="right" class="pages div_pages" style="display: none;">
                    <ul>
                        <asp:LinkButton ID="lnkFirst" runat="server" CssClass="pre">Trước</asp:LinkButton>
                        <asp:Repeater ID="rptPage" runat="server">
                            <ItemTemplate>
                                <asp:LinkButton ID="lnkTitle" CssClass="page_num" runat="server" OnClick="lnkTitle_Click"></asp:LinkButton>
                            </ItemTemplate>
                        </asp:Repeater>
                        <asp:LinkButton ID="lnkLast" runat="server" CssClass="next">Sau</asp:LinkButton>
                    </ul>
                </div>
                <asp:HiddenField ID="hidCount" Value="0" runat="server" />
                <asp:HiddenField ID="hidIndex_page" Value="0" runat="server" />
                <asp:HiddenField ID="hidCur_Page" Value="1" runat="server" />
            </div>
        </div>
        </div>
    </ContentTemplate>
</asp:UpdatePanel>
